from flask import Flask
from flask_sqlalchemy import SQLAlchemy
# from config import SQLALCHEMY_DATABASE_URL

app = Flask(__name__)
# app.config['SQLALCHEMY_DATABASE_URI'] = SQLALCHEMY_DATABASE_URL
app.config.from_object('config')
db = SQLAlchemy(app)

# 登录系统扩展
import os
from flask_login import LoginManager
from flask_openid import OpenID
from config import basedir

lm = LoginManager()
lm.login_view = 'login'
lm.init_app(app)
oid = OpenID(app, os.path.join(basedir, 'tmp'))

from app import views, models